/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.groupjjk.spectatorsportsonline.models.MLB;

import com.groupjjk.spectatorsportsonline.fathers.Team;
import java.io.Serializable;
import javax.persistence.*;

/**
 *
 * @author Jrdevelopment
 */
@Entity
public class MLBIning extends Team implements Serializable {

    @ManyToOne
    private MLBGame mLBGame;
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private int pointsHome;
    private int poinstsVisitor;
    private boolean isEntry;
    @OneToOne
    private MLBIningType iningType;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (getId() != null ? getId().hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MLBIning)) {
            return false;
        }
        MLBIning other = (MLBIning) object;
        if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.groupjjk.spectatorsportsonline.models.MLB.MLBIninig[ id=" + getId() + " ]";
    }

    /**
     * @return the mLBGame
     */
    public MLBGame getmLBGame() {
        return mLBGame;
    }

    /**
     * @param mLBGame the mLBGame to set
     */
    public void setmLBGame(MLBGame mLBGame) {
        this.mLBGame = mLBGame;
    }

    /**
     * @return the pointsHome
     */
    public int getPointsHome() {
        return pointsHome;
    }

    /**
     * @param pointsHome the pointsHome to set
     */
    public void setPointsHome(int pointsHome) {
        this.pointsHome = pointsHome;
    }

    /**
     * @return the poinstsVisitor
     */
    public int getPoinstsVisitor() {
        return poinstsVisitor;
    }

    /**
     * @param poinstsVisitor the poinstsVisitor to set
     */
    public void setPoinstsVisitor(int poinstsVisitor) {
        this.poinstsVisitor = poinstsVisitor;
    }

    /**
     * @return the isEntry
     */
    public boolean isIsEntry() {
        return isEntry;
    }

    /**
     * @param isEntry the isEntry to set
     */
    public void setIsEntry(boolean isEntry) {
        this.isEntry = isEntry;
    }

    /**
     * @return the iningType
     */
    public MLBIningType getInigType() {
        return iningType;
    }

    /**
     * @param iningType the iningType to set
     */
    public void setInigType(MLBIningType inigType) {
        this.iningType = inigType;
    }
}
